package com.ihg.hiex.entity.session.during;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.user.Delegate;

/**
 * 
 * @author mohanlan
 *
 */
@Entity
@Table(name = "session_finance_management")
public class SessionFinanceManagement {
    
    @Id
    @GeneratedValue
    private Long id;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Delegate delegate;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Session session;
    
    /**
     * 主要指标
     */
    @org.hibernate.annotations.Type(type = "text")
    private String problems;
    
    /** 所选指标 */
    private String problem;
    
    /** 原因分析 */
    @org.hibernate.annotations.Type(type = "text")
    private String reasons;
    
    /** 所选部门 */
    private String department;
    
    /** 改善目标 */
    private String improvingGoal;
    
    /** 部门行动计划*/
    @org.hibernate.annotations.Type(type = "text")
    private String plans;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    public SessionFinanceManagement() {
        // TODO Auto-generated constructor stub
    }
    
    /**
     * 
     * @param session
     * @param delegate
     * @return
     */
    public SessionFinanceManagement initilization(Session session, Delegate delegate) {
        this.session = session;
        this.delegate = delegate;
        this.disabled = false;
        return this;
    }
    
    /**
     * 
     * @param sessionFinanceManagement
     * @return
     */
    public SessionFinanceManagement edit(SessionFinanceManagement sessionFinanceManagement) {
        this.problems = sessionFinanceManagement.getProblems();
        this.problem = sessionFinanceManagement.getProblem();
        this.reasons = sessionFinanceManagement.getReasons();
        this.department = sessionFinanceManagement.getDepartment();
        this.improvingGoal = sessionFinanceManagement.getImprovingGoal();
        this.plans = sessionFinanceManagement.getPlans();
        return this;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the delegate
     */
    public Delegate getDelegate() {
        return delegate;
    }

    /**
     * @return the session
     */
    public Session getSession() {
        return session;
    }

    /**
     * @return the problems
     */
    public String getProblems() {
        return problems;
    }

    /**
     * @return the problem
     */
    public String getProblem() {
        return problem;
    }

    /**
     * @return the reasons
     */
    public String getReasons() {
        return reasons;
    }

    /**
     * @return the department
     */
    public String getDepartment() {
        return department;
    }

    /**
     * @return the improvingGoal
     */
    public String getImprovingGoal() {
        return improvingGoal;
    }

    /**
     * @return the plans
     */
    public String getPlans() {
        return plans;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param delegate the delegate to set
     */
    public void setDelegate(Delegate delegate) {
        this.delegate = delegate;
    }

    /**
     * @param session the session to set
     */
    public void setSession(Session session) {
        this.session = session;
    }

    /**
     * @param problems the problems to set
     */
    public void setProblems(String problems) {
        this.problems = problems;
    }

    /**
     * @param problem the problem to set
     */
    public void setProblem(String problem) {
        this.problem = problem;
    }

    /**
     * @param reasons the reasons to set
     */
    public void setReasons(String reasons) {
        this.reasons = reasons;
    }

    /**
     * @param department the department to set
     */
    public void setDepartment(String department) {
        this.department = department;
    }

    /**
     * @param improvingGoal the improvingGoal to set
     */
    public void setImprovingGoal(String improvingGoal) {
        this.improvingGoal = improvingGoal;
    }

    /**
     * @param plans the plans to set
     */
    public void setPlans(String plans) {
        this.plans = plans;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
    
    
}
